<?php

class DonationAllocations extends HTech_Db_Table
{
    protected $_name    = 'view_donation_allocations';
    protected $_primary = 'DonationAllocationId';  
    
    protected function _setGridMetadata()
    {
        $this->_gridMetadata['title'] = $this->translate("Allocated donations");
        $this->_gridMetadata['params'] = array('PartnerId','SponsorId','LoanMasterId');
        $this->_gridMetadata['onClick'] = 'sponsor.donation-allocation.view';
        $this->_gridMetadata['headers'] = array
            (
                array('Partner',            150, $this->translate("Partner"),         'String'),
                array('Sponsor',            250, $this->translate("Sponsor"),         'String'),
                array('ProductLineName',    100, $this->translate("Line"),            'String'),
                array('ProgramName',        200, $this->translate("Program"),         'String'),
                array('LocationShortName',   80, $this->translate("Branch"),          'String'),
                array('OfficerUsername',     80, $this->translate("Officer"),         'String'),
                array('Borrower',           250, $this->translate("Borrower"),        'String'),
                array('LoanMasterId',       100, $this->translate("Master code"),     'String'),
                array('DeliveryDate',       100, $this->translate("Disbursement"),    'DateTime', 'Date'),
                array('ExpectedCancelDate', 100, $this->translate("Term"),            'DateTime', 'Date'),
                array('Donation',            80, $this->translate("A. amount"),       'Number',   'Standard'),
                array('Datetime',           120, $this->translate("Allocation date"), 'DateTime', 'Date')
            );
        return $this;
    }
}
